<ul class="layui-nav layui-bg-cyan" lay-filter="">
    <!--<li class="layui-nav-item">-->
        <!--<a href="javascript:;">商品管理</a>-->
        <!--<dl class="layui-nav-child"> &lt;!&ndash; 二级菜单 &ndash;&gt;-->
            <!--<dd><a href="{:url('index/examine/index')}">产品审核</a></dd>-->
            <!--<dd><a href="{:url('index/product/index')}">通过产品</a></dd>-->
            <!--<dd><a href="{:url('index/content/index')}">内容制作</a></dd>-->
            <!--<dd><a href="{:url('index/shelves/index')}">上架产品</a></dd>-->
        <!--</dl>-->
    <!--</li>-->
    <li class="layui-nav-item"><a href="{:url('index/shelves/index')}">商品管理</a> </li>
    <li class="layui-nav-item"><a href="{:url('index/order/index')}">商家管理</a> </li>
    <li class="layui-nav-item"><a href="{:url('index/purchase/index')}">采购单</a> </li>
    <li class="layui-nav-item"><a href="{:url('index/settlement/index')}">结算中心</a> </li>
    <li class="layui-nav-item"><a href="{:url('index/shop/index')}">店面管理</a> </li>
    <li class="layui-nav-item"><a href="{:url('index/coupon/index')}">优惠券查询</a> </li>
    <li class="layui-nav-item"><a href="{:url('index/apply/index')}">结算申请<span class="layui-badge">{$applyCount}</span></a></li>
    <li class="layui-nav-item"><a href="{:url('online/index/index')}">一键代发商品</a> </li>
    <li class="layui-nav-item"><a href="{:url('online/mail/index')}">邮寄</a> </li>

    <li class="layui-nav-item"><a href="{:url('index/delete/index')}">已删除商品</a> </li>
    <li class="layui-nav-item"></li>
    <li class="layui-nav-item" style="float: right">
        <button type="button" style="background-color: #2F4056" class="layui-btn" id="uploads">
            <i class="layui-icon" ><img id='image' src="__ROOT__\{$image}" class="" style="width: 30px;height: 30px;margin-right: 10px;border-radius: 50%;">我</i>
        </button>
        <input type="file" name="file" id="up" style="display: none" class="layui-upload-file">
        <dl class="layui-nav-child">
            <dd><a href="javascript:;" onclick="exit()">退了</a></dd>
        </dl>
    </li>
</ul>
<script>
    //页面加载是获取头像

    //注意：导航 依赖 element 模块，否则无法进行功能性操作
    layui.use('element', function(){
        var element = layui.element;
    });
    //退出
    function exit() {
        layer.confirm('你确定要退出吗',{bnt:['退出','取消']},
            function () {
                window.location.href = "{:url('index/index/adminoutlogin')}";
            }
        );
    }
    //更换头像
    layui.use('upload', function(){
        var upload = layui.upload;

        //执行实例
        var uploadInst = upload.render({
            elem: '#uploads', //绑定元素,
            url: "{:url('index/common/updatelogo')}", //上传接口
            done: function(res){
                if(res.error){
                    layer.alert(res.error);
                }else{
                    $("#image").attr('src',"__ROOT__\\"+res.image);
                }
            }
        });
    });

</script>